package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 订单管理对象 sys_order
 * 
 * @author ruoyi
 * @date 2025-10-08
 */
public class SysOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 姓名 */
    @Excel(name = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    /** 手机号 */
    @Excel(name = "手机号")
    @NotBlank(message = "手机号不能为空")
    private String mobile;

    /** 微信号 */
    @Excel(name = "微信号")
    @NotBlank(message = "微信号不能为空")
    private String wechatId;

    /** 微信openId */
    @Excel(name = "微信openId")
    private String openId;

    /** 昵称 */
    @Excel(name = "昵称")
    @NotBlank(message = "昵称不能为空")
    private String nickName;

    /** 课程编号 */
    @Excel(name = "课程编号")
    @NotBlank(message = "课程编号不能为空")
    private String courseNo;

    /** 课程名称 */
    @Excel(name = "课程名称")
    @NotBlank(message = "课程名称不能为空")
    private String courseName;

    /** 收款账户 */
    @Excel(name = "收款账户")
    private String payeeAccount = "DRZH";

    /** 成交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "成交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dealTime;

    /** 代理商ID */
    /** 一级id */
    @Excel(name = "一级id")
    private Long level1Id;

    /** 二级id */
    @Excel(name = "二级id")
    private Long level2Id;

    /** 订单状态(用户端状态)，0：创单未支付， */
    @Excel(name = "订单状态(用户端状态)，0：创单未支付，")
    private Long userStatus;

    /** 支付状态，0：未支付，1：已支付 */
    @Excel(name = "支付状态，0：未支付，1：已支付")
    private Long payStatus;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    /** 审核状态0：提交，1：审核中，2：成功，3：失败 */
    @Excel(name = "审核状态0：提交，1：审核中，2：成功，3：失败")
    private Long auditStatus;

    /** 退款状态，0：未退款，1：申请，2：部分退，3：全部退，4：失败 */
    @Excel(name = "退款状态，0：未退款，1：申请，2：部分退，3：全部退，4：失败")
    private Long refundStatus;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private BigDecimal refundAmount;

    /** 订单来源，0：线下录入，1：公众号，2：企业微信，3：小鹅通 */
    @Excel(name = "订单来源，0：线下录入，1：公众号，2：企业微信，3：小鹅通")
    private Long orderSource;

    /** 删除标志（0代表存在 1代表删除） */
    @Excel(name = "删除标志（0代表存在 1代表删除）")
    private Integer deleteFlag;

    private String payCertificate;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setMobile(String mobile) 
    {
        this.mobile = mobile;
    }

    public String getMobile() 
    {
        return mobile;
    }

    public void setWechatId(String wechatId) 
    {
        this.wechatId = wechatId;
    }

    public String getWechatId() 
    {
        return wechatId;
    }

    public void setNickName(String nickName) 
    {
        this.nickName = nickName;
    }

    public String getNickName() 
    {
        return nickName;
    }

    public void setCourseNo(String courseNo) 
    {
        this.courseNo = courseNo;
    }

    public String getCourseNo() 
    {
        return courseNo;
    }

    public void setCourseName(String courseName) 
    {
        this.courseName = courseName;
    }

    public String getCourseName() 
    {
        return courseName;
    }

    public void setPayeeAccount(String payeeAccount) 
    {
        this.payeeAccount = payeeAccount;
    }

    public String getPayeeAccount() 
    {
        return payeeAccount;
    }

    public void setDealTime(Date dealTime) 
    {
        this.dealTime = dealTime;
    }

    public Date getDealTime() 
    {
        return dealTime;
    }

    public Long getLevel1Id() {
        return level1Id;
    }

    public void setLevel1Id(Long level1Id) {
        this.level1Id = level1Id;
    }

    public Long getLevel2Id() {
        return level2Id;
    }

    public void setLevel2Id(Long level2Id) {
        this.level2Id = level2Id;
    }

    public void setUserStatus(Long userStatus)
    {
        this.userStatus = userStatus;
    }

    public Long getUserStatus() 
    {
        return userStatus;
    }

    public void setPayStatus(Long payStatus) 
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus() 
    {
        return payStatus;
    }

    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }

    public void setAuditStatus(Long auditStatus) 
    {
        this.auditStatus = auditStatus;
    }

    public Long getAuditStatus() 
    {
        return auditStatus;
    }

    public void setRefundStatus(Long refundStatus) 
    {
        this.refundStatus = refundStatus;
    }

    public Long getRefundStatus() 
    {
        return refundStatus;
    }

    public void setRefundAmount(BigDecimal refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getRefundAmount() 
    {
        return refundAmount;
    }

    public void setOrderSource(Long orderSource) 
    {
        this.orderSource = orderSource;
    }

    public Long getOrderSource() 
    {
        return orderSource;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getPayCertificate() {
        return payCertificate;
    }

    public void setPayCertificate(String payCertificate) {
        this.payCertificate = payCertificate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("name", getName())
            .append("mobile", getMobile())
            .append("wechatId", getWechatId())
            .append("nickName", getNickName())
            .append("courseNo", getCourseNo())
            .append("courseName", getCourseName())
            .append("payeeAccount", getPayeeAccount())
            .append("dealTime", getDealTime())
            .append("level1Id", getLevel1Id())
            .append("level2Id", getLevel2Id())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("userStatus", getUserStatus())
            .append("payStatus", getPayStatus())
            .append("payAmount", getPayAmount())
            .append("auditStatus", getAuditStatus())
            .append("refundStatus", getRefundStatus())
            .append("refundAmount", getRefundAmount())
            .append("orderSource", getOrderSource())
            .append("deleteFlag", getDeleteFlag())
            .append("openId", getOpenId())
            .append("payCertificate", getPayCertificate())
            .toString();
    }
}
